package com.hbase.handler.hfile.scala

import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.fs.Path
import org.apache.hadoop.hbase.HBaseConfiguration

object ImportHfileToHbaseTable {

    def main(args: Array[String]): Unit = {
        import org.apache.hadoop.hbase.client.HTable
        import org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles
        val output = "/user/model/diven/test/hfile-1625132677015"
        val hbaseConf: Configuration = HBaseConfiguration.create

        val table = new HTable(hbaseConf, "engine_matrix_info_01")
        val loader = new LoadIncrementalHFiles(hbaseConf)
        loader.doBulkLoad(new Path(output), table)
    }

}
